$(function () {
    var t = "pop-in";
    mui("body").on("tap", "a", function () {
        var e = this.getAttribute("href"), i = this.href;
        mui.openWindow({id: e, url: i, styles: {popGesture: "close"}, show: {aniShow: t}, waiting: {autoShow: !0}})
    });
    var e = ["代办入台证", "代订厦金船票", "代订小三通船票", "代订台湾名宿", "代订中远之星船票", "小币种兑换", "代办各国签证", "出境退税", "代售景区门票"], i = ["passport/passport-information.html", "ship/ship-index.html", "third/third-index.html", "booking/booking-people.html", "ship/ship-index-zx.html", "currency/currency-convertibility.html", "visa/visa-info.html", "view/view-tax.html", "view/view-frame.html"], o = function (t) {
        1 == t.code ? (n.setHtmlTitle(e[r]), $("#title-txt").text(e[r]), $("#content-txt").empty().append(t.content || ""), $(".next-step").parent("a").attr("href", i[r] || "#")) : mui.toast(t.message || "")
    }, n = new common, r = n.getQueryString("type"), a = n.getQueryString("view");
    if (r && !isNaN(r) && r >= 0) {
        var s = {
            url: n.hostUrl + "mobileappapply/getAgreement.do",
            data: {type: r, FKEY: n.getKey("getAgreement")},
            success: o
        };
        s = $.extend({}, n.ajaxOption, s), $.ajax(s)
    } else mui.toast("获取协议异常！");
    a && 1 == a && $("footer").remove()
});